package com.whros.algorithm.sort;

import java.util.Comparator;

/**
 * 冒泡排序
 * @author whroid
 * @date 2018/11/3.
 */
public class BubbleSortAlgorithm <T extends Comparable> implements SortAlgorithm<T>{

    @Override
    public void sortByDesc(T[] arr) {
        sort(arr, (a, b) -> b.compareTo(a));
    }

    @Override
    public void sortByAsc(T[] arr) {
        sort(arr, (a, b) -> a.compareTo(b));
    }

    @Override
    public void sort(T[] arr, Comparator<T> comparable) {

    }
}
